package com.guoyansoft.model.dao;

import com.guoyansoft.model.pojo.Goods;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface GoodsDao {
    List<Goods> selectByshopName(Map<String,Object> params);;
    List<Goods>selectByshopId(Map<String,Object> params);
    int selectTotalByshopId(Map<String,Object> params);
    List<Goods> selectByShopTypeId(Map<String,Object> params);
    Long selectTotalByShopTypeId(Map<String,Object> params);
    int selectTotalSize(Map<String,Object> params);

    /**
     * 获取商店所有商品并分页
     * @param params 分页、shopIdKey
     * @return 集合
     */
    List<Goods> selectPageAndShopId(Map<String,Object> params);
    long selectTotalPageAndShopId(Map<String,Object> params);

    List<Goods> selectByPage(Map<String,Object> params) ;
    int selectCount(Map<String,Object> params);
    int update(Goods goods);
    int deleteBatch(Integer[] ids);
    int insert(Goods goods);
    Goods selectById(int id);
    Goods selectByGoodsName(String goodsName);

}
